<!DOCTYPE html>
<head>
<meta charset="utf-8" />
	<link id="styleStuff" rel="stylesheet" type="text/css" href="style.css" />
	<link rel="stylesheet" type="text/css" href="notification.css" />
	<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
	<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.12/vue.min.js"></script>
	<script type="text/javascript" src="js/technical/break_eternity.js"></script>
	<script type="text/javascript" src="js/technical/layerSupport.js"></script>
	<script type="text/javascript" src="js/tree.js"></script>
	<script type="text/javascript" src="js/sc.js"></script>
	<script type="text/javascript" src="js/help.js"></script>
	<script type="text/javascript" src="js/layers.js"></script>
	<script type="text/javascript" src="js/mod.js"></script>
	<script type="text/javascript" src="js/technical/temp.js"></script>
	<script type="text/javascript" src="js/game.js"></script>
	<script type="text/javascript" src="js/utils.js"></script>
	<script type="text/javascript" src="js/technical/systemComponents.js"></script>
	<script type="text/javascript" src="js/components.js"></script>
	<script type="text/javascript" src="js/technical/canvas.js"></script>
</head>
<body onload="load()">
	<script src="chs.js?202106041511"></script>
	<script src="//g8hh.com/zh/core.js"></script> 
	<div id="app">
		<canvas id="treeCanvas" class="canvas" v-if ="!(gameEnded && !player.keepGoing)"></canvas>

		<div v-if="false" id="loadingSection" class="fullWidth">
			<h1>加载中...<br></h1><br>如果用时过长，请联系作者的 <a style="font-size: 30px" href="https://discord.gg/ww5NQutTRK">discord</a>。
		</div>
		<div v-bind:style="{display: 'block'}" style="display: none;">
			<div class="vl" v-if="player.navTab!= 'none' &&player.tab!='none'&&!(gameEnded && !player.keepGoing)"></div>
			<div v-if="(gameEnded && !player.keepGoing)" class="fullWidth">
				<br>
				<h2>{{modInfo.name}} {{VERSION.withoutName}}</h2><br><br>
				<h3>恭喜! 你达到了目前的通关条件。</h3><br>
				<h3>在作者的 discord 上可以检查是否有新的内容更新。</h3><br><br>
				<div v-if="!player.timePlayedReset">通关用时 {{formatTime(player.timePlayed)}}。</div>
				<div v-if="player.timePlayedReset">若这是速通记录，请在流上推送此记录。</div>
				<br>
				<button class="longUpg can" onclick="hardReset(true)">重玩</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="longUpg can" onclick="keepGoing()">继续游戏</button>
				<br><br><br>
				<a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">The Prestige Tree Discord</a><br>
				<a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br>
				<br><br>
				如果你想要速通这个游戏的话，点击「重玩」按钮并记录你的游戏过程，将视频发布在 Discord 的 #speedrun-submissions 频道上。
				<br><br><br>
			</div>

			<!-- Notifications -->
			<div class="notification-container">
				<transition-group name="fade">
					<div v-for="notification,index in activeNotifications" class="notification" v-bind:class="notification.type" v-bind:key="notification.id">
						<h3>{{notification.title}}</h3><br>
						<h2 v-html="notification.message"></h2>
					</div>
				</transition-group>
			</div>


			<div v-if="player.tab=='info'" class="col right">
				<button class="back" onclick="showTab('none')">←</button><br>
				<h2>{{modInfo.name}}</h2>
				<br>
				<h3>{{VERSION.withName}}</h3>
				<span v-if="modInfo.author">
					<br>
					由 {{modInfo.author}} 制作
				</span>
				<br>
				The Modding Tree {{TMT_VERSION.tmtNum}} by Acamaeda
				<br>
				灵感来源 papyrus#6977 (discord)
				<br><br>
				注意：作者支持使用 TMT 开发自己的 mod，但需要注意为你自己的树取一个不同的名字，并保证上述的制作人表在游戏中可见<br><br>
				<a v-bind:href="modInfo.changelogLink" target="_blank" class="link" >更新记录</a><br>
				<a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">The Prestige Tree Discord</a><br>
				<a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br>
				<a class="link pat" href="http://patreon.com/Jacorb90" target="_blank" v-bind:style="{'font-size': '18px'}">赞助</a><br>
				<br><br>
				已游玩时间: {{ formatTime(player.timePlayed) }}<br>
				<span v-for="layer in LAYERS"><span v-if="player[layer].first!==undefined && player[layer].unlocked">{{layer}} 层第一次重置于: {{formatTime(player[layer].first)}}<br></span></span><br>
				<h3>快捷键</h3><br>
				<span v-for="key in hotkeys" v-if="player[key.layer].unlocked"><br>{{key.description}}</span>
				<br>按下 - 以显示公式
			</div>
			<div v-if="player.tab=='help' && (typeof help_data != 'undefined')" class="col right">
				<div v-if="typeof tmp.helpTab == 'number'">
					<button class="back" onclick="showTab('none')">←</button><br>
					<div v-if="player.a.achievements.length==0">开始游戏后再来查看帮助。</div>
					<ul v-else><br><br><br><li v-for="data in tmp.helpData"><a v-if="data.unlocked" class="link" v-on:click="tmp.helpTab = data.id" v-html="data.title"></a><br></li></ul>
				</div>
				<div v-else>
					<button class="back" onclick="tmp.helpTab = NaN">←</button><br>
					<h2 v-html="tmp.helpData[tmp.helpTab].title"></h2><br><br>
					<div v-html="tmp.helpData[tmp.helpTab].text"></div>
				</div>
			</div>
			<div v-if="player.tab=='options'" class="col right">
				<button class="back" onclick="showTab('none')">←</button><br>
				<div class="upgTable" style="padding-top: 25px; margin-bottom: 24px;">
					<div class="upgRow">
						<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='mainOpt'">主选项</button></div>
						<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='displayOpt'">显示选项</button></div>
						<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='notifyOpt'">节点荧光选项</button></div>
					</div>
				</div>
				<div v-if="player.optTab=='mainOpt'">
					<table>
						<tr>
							<td><button class="opt" onclick="save()">保存</button></td>
							<td><button class="opt" onclick="toggleOpt('autosave')">自动保存: {{ player.autosave?"开":"关" }}</button></td>
							<td><button class="opt" onclick="hardReset()">硬重置</button></td>
						</tr>
						<tr>
							<td><button class="opt" onclick="exportSave()">导出到剪切板</button></td>
							<td><button class="opt" onclick="importSave()">导入</button></td>
							<td><button class="opt" onclick="toggleOpt('offlineProd')">离线进度: {{ player.offlineProd?"开":"关" }}</button></td>
						</tr>
						<tr>
							<td><button class="opt" onclick="showAllSaves()">所有存档</button></td>
							<td><button class="opt" onclick="toggleOpt('tapNerd')">公式显示: {{player.tapNerd?"点击时":"按住时"}}</button></td>
							<td></td>
						</tr>
					</table>
				</div><div v-if="player.optTab=='displayOpt'">
					<table>
						<tr>
							<td><button class="opt" onclick="switchTheme()">主题: {{ getThemeName() }}</button></td>
							<td><button class="opt" onclick="toggleOpt('oldStyle')">样式: {{ player.oldStyle?"v1.0":"NEW" }}</button></td>
							<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('hqTree')">高质量树: {{ (player.hqTree&&!player.oldStyle)?"开":"关" }}</button></td>
						</tr>
						<tr>
							<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('grad')">渐变: {{ (player.grad&&!player.oldStyle)?"开":"关" }}</button></td>
							<td><button class="opt" onclick="adjustMSDisp()">显示里程碑: {{ player.msDisplay.toUpperCase() }}</button></td>
							<td><button class="opt" onclick="toggleOpt('milNotify')">里程碑提示: {{ player.milNotify?"开":"关" }}</button></td>
						</tr>
						<tr>
							<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('anim')">动画: {{ (player.anim&&!player.oldStyle)?"开":"关" }}</button></td>
							<td><button class="opt" onclick="toggleOpt('hideChallenges')">已完成挑战: {{ player.hideChallenges?"隐藏":"显示" }}</button></td>
							<td><button v-if="hasAchievement('a', 21)" class="opt" onclick="toggleOpt('scShown')">软上限节点: {{player.scShown?"显示":"隐藏"}}</button></td>
						</tr>
						<tr>
							<td><button v-if="player.ma.unlocked" class="opt" onclick="toggleOpt('hideStars')">镀金星: {{ player.hideStars?"隐藏":"显示" }}</button></td>
						</tr>
					</table>
				</div><div v-if="player.optTab=='notifyOpt'">
					<table>
						<tr>
							<td><button class="opt" onclick="adjustGlow('slight')">白色荧光: {{ player.slightGlow.toUpperCase() }}</button></td>
							<td><button class="opt" onclick="toggleOpt('redGlowActive')">红色荧光: {{ player.redGlowActive?"开":"关" }}</button></td>
							<td><button v-if="player.s.unlocked" class="opt" onclick="adjustGlow('space')">红色荧光 - 建筑: {{ player.spaceGlow.toUpperCase() }}</button></td>
						</tr>
						<tr>
							<td><button v-if="player.o.unlocked" class="opt" onclick="adjustGlow('sol')">红色荧光 - 阳光可购买项: {{ player.solGlow.toUpperCase() }}</button></td>
							<td><button v-if="player.m.unlocked" class="opt" onclick="adjustGlow('maj')">红色荧光 - 魔法: {{ player.majGlow.toUpperCase() }}</button></td>
							<td><button v-if="player.mc.unlocked" class="opt" onclick="toggleOpt('shellGlow')">红色荧光 - 命令行扩展: {{ player.shellGlow?"开":"关" }}</button></td>
						</tr>
					</table>
				</div><br><br>
				<saves></saves>
			</div>
			<div id="treeOverlay" class="treeOverlay" v-if="player.tab!='gameEnded'" v-bind:class="{ fullWidth: (player.tab == 'tree' || player.tab == 'none'), col: (player.tab != 'tree' && player.tab != 'none'), left: (player.tab != 'tree' && player.tab != 'none')}">
				<div id="version" class="overlayThing" style="margin-right: 25px">{{VERSION.withoutName}}</div>
				<img id="optionWheel"  class="overlayThing" v-if="player.tab!='options'" src="images/options_wheel.png" onclick="showTab('options')"></img>
				<div id="info" v-if="player.tab!='info'"  class="overlayThing" onclick="showTab('info')"><br>i</div>
				<div id="help" v-if="player.tab!='help' && (typeof help_data != 'undefined')"  class="overlayThing" onclick="showTab('help')"><br>?</div>
				<div id="discord" class="overlayThing">
					<img onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'http://discord.gg/wwQfgPa'),'mywindow')" src="images/discord.png"  target="_blank"></img>
					<ul id="discord-links">
						<li><a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Prestige Tree Discord</a></li>
						<li><a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br></li>
					</ul>
				</div>
				<div class="overlayThing" style="padding-bottom:7px; width: 90%;">
					<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
						<br>进展乘速: {{format(player.devSpeed)}}x<br>
					</span>
					<span v-if="player.offTime !== undefined && player.offTime !== null"  class="overlayThing">
						<br>离线时间: {{formatTime(player.offTime?player.offTime.remain:0)}}<br>
					</span>
					<span v-if="!player.keepGoing" class="overlayThing">
						<br><span v-if="modInfo.specialEndgameText">{{modInfo.specialEndgameText}}</span><span v-if="!modInfo.specialEndgameText">当前结局： {{formatWhole(modInfo.endgame)+" "+modInfo.pointsName}} </span><br>
					</span>
					<br>
					<span v-if="player.points.lt('1e1000')">你有 </span>
					<h2 id="points">{{format(player.points)}}</h2>
					<span v-if="player.points.lt('1e1e6')"> {{modInfo.pointsName}}</span>
					<br>
					<span v-if="canGenPoints()">({{format(getPointGen())}}/sec)</span>
					<div v-for="thing in tmp.displayThings"><span v-if="thing" v-html="thing"></span></div>
				</div>
				<div class="sideLayers" >
					<div v-for="node in OTHER_LAYERS['side']"><layer-node :layer='node' :abb='tmp[node].symbol' :size="'small'"></layer-node><br><button class='smallNode hidden'></button></div>
				</div>
			</div>


			<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
				<br><br><br><br><br><br>
				<overlay-head id="fakeHead" style="visibility: hidden;">
				</overlay-head>

				<layer-tab :layer="player.navTab == 'none' ? player.tab : player.navTab"></layer-tab>

			</div>
			<div v-if="(player.navTab !== 'none' && player.tab !== 'tree' && LAYERS.includes(player.tab)) && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
				<layer-tab :layer="player.tab" :back="'tree'" :spacing="'50px'"></layer-tab>
			</div>
		</div>
	</div>
	
	<script src="//g8hh.com/static/js/jquery.min.js"></script>
	<link rel="stylesheet" href="//g8hh.com/static/css/kf.css" type="text/css" media="screen" charset="utf-8">
	<script src="//g8hh.com/static/js/kf.js"></script>
<!--站长统计-->
    <div style="display: none">
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?dbb7ff142f4d4b68546c93b9cd6e9328";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
    </div>
</body>
